package Singletion;

//懒汉型线程 安全
public class Coin3 {

    private Coin3()
    {

    }

    private static class Coin3Holder
    {
        public static Coin3 instance=new Coin3();
    }

    public static Coin3 getInstance()
    {
        //静态内部类只会使用时才会加载
        return Coin3Holder.instance;
    }
}
